#pragma once

#include "cocos2d.h"
#include "../common/definition.h"
#include <map>

struct FrameAnimateInfo
{
    FrameAnimateInfo() {}
    FrameAnimateInfo(unsigned total, unsigned section, float interval)
        :totalFrames(total)
        ,sectionFrames(section)
        ,frameInterval(interval)
    {
    }
    unsigned totalFrames;
    unsigned sectionFrames;
    float frameInterval;
};

class CharacterActionAnimate
{
public:
	static CharacterActionAnimate* getInstance();
    const FrameAnimateInfo& getAnimateInfo(ActionType action);

private:
	CharacterActionAnimate();
	~CharacterActionAnimate() {}
    
private:
	static CharacterActionAnimate *_instance;
    std::map<int, FrameAnimateInfo> _actionAnimateMap;
};